The present invention relates generally to computer networks and, more particularly, to the partitioning of data processing applications in computer networks.
Increasingly, data processing operations on an enterprise level are being performed using partitioned applications. Application partitioning allows various components of an application to be separated out and distributed across a network. Application partitioning also can facilitate efficient use of resources by dedicating hardware and software to specific tasks. In addition, by separating application components according to functionality, data integrity and scalability can be enhanced.
Increasing interest is being shown in application partitioning across the Internet and, particularly, the World Wide Web (Web). Various efforts are underway to enhance Web browsers, develop Web applications, and improve database connectivity and object management via the Web. Such efforts have produced the Java(copyright) object oriented programming language and various specifications for passing objects around a network, such as Internet Inter-ORB Protocol (IIOP) and Common Object Request Broker Architecture (CORBA).
Although methods, such as CORBA and IIOP exist for invoking applications across a network of servers, such methods may require significant system resources to set up the environment within which these applications can be invoked. For example, skeletons and stubs are typically built and stored within server hosting machines and client hosting machines, respectively. In addition, existing methods for invoking applications across a network of servers are generally geared towards object passing that may require the use of complex interface definition language (IDL) compilers to generate a client/server interface.
Java(copyright) is an object-oriented programming language developed by Sun Microsystems, Mountain View, Calif. Java(copyright) is a portable and architecturally neutral language. Java(copyright) source code is compiled into a machine-independent format that can be run on any machine with a Java(copyright) runtime system known as the Java(copyright) Virtual Machine (JVM). The JVM is defined as an imaginary machine that is implemented by emulating a processor through the use of software on a real machine. Accordingly machines running under diverse operating systems, including UNIX, Windows NT, and MacIntosh having a JVM can execute the same Java(copyright) program.
Servlets are Java(copyright) applications that have been developed to extend the functionality of Web servers. Servlets may be referred to as server-side applets or applications. Similar to the way Java(copyright) applets run on a browser and extend a browser""s capabilities, servlets run on a JVM on a host computer, such as a Web server.
A servlet enhances a Web server by enabling client-server services. When a client computer sends a request to a Web server, the Web server can send the request information to a servlet and have the servlet construct the response that the Web server sends back to the client computer. In addition, a servlet can be loaded automatically when a Web server is started, or a servlet can be loaded the first time a client computer requests the services of a servlet. After loading, a servlet typically continues to run, waiting for additional client requests.
Servlets can be significant because they can dynamically extend the function of the host computer. As is known to those skilled in this art, servlets are advantageous because a servlet is running in the context of a server process on a host computer. This can save time and effort otherwise needed to create a common gateway interface (CGI) process to serve an incoming request. Furthermore, because servlets are written in Java(copyright), complicated, cross-platform Web applications can be created without having to create multiple versions of each application.
Servlets having similar computer resource requirements are conventionally organized together within a single JVM. For example, a first group of servlets may require a lot of memory resources from a server, while a second group of servlets may require database connectivity. Accordingly, the first group of servlets are preferably located within a JVM running on a host computer having sufficient memory resources. The second group of servlets are preferably located within another JVM running on a separate host computer having database connectivity resources.
One or more servlets can be invoked in sequence within a JVM by creating a servlet chain and then invoking the first servlet in the chain. In a servlet chain, the first servlet receives a request and sends its response to the next servlet in the chain. The last servlet in the chain sends its response to the user. Unfortunately, servlets can be chained together only within a single JVM. As a result, the present inability to chain servlets across different multiple JVMs, may severely limit application partitioning across the Internet and other Web-based networks.
In view of the above discussion, it is an object of the present invention to facilitate application partitioning across the Internet and other Web-based networks.
It is another object of the present invention to facilitate the chaining of servlets across separate JVMs.
These and other objects of the present invention are provided by systems, methods and computer program products for using fully qualified universal resource locators (URLs) to chain together servlets across multiple remotely located JVMs in a network in order to implement application partitioning across the network. Each servlet in a chain is configured to perform a respective processing task using a response from a preceding servlet in the chain. A fully qualified URL includes an identification of a host computer, an identification of a filter within the host computer, and an identification of a servlet residing within the host computer.
Steps for creating a chain of remotely located servlets include defining an order in which each servlet in the chain is to perform a respective processing task, and then mapping a location of each servlet within the chain to a filter within each respective host computer. Each servlet location is then registered with a network directory, such as a Lightweight Directory Access Protocol directory, that is accessible by each host computer.
A chain of remotely located servlets may be invoked by a user, according to the present invention, by invoking a first servlet located within a first host computer to perform a first processing task. A filter within the first host computer examines a fully qualified universal resource locator (URL) used to invoke the first servlet to determine whether one or more additional servlets are chained to the first servlet. Upon determining that one or more additional servlets are chained to the first servlet, a second servlet in the chain, typically residing within a second host computer, is invoked to perform a second processing task using a response produced by the first servlet. A filter within the second host computer examines a fully qualified universal resource locator (URL) used to invoke the second servlet and determines whether one or more additional servlets are chained to the second servlet. Upon determining that no additional servlets are chained to the second servlet, a response produced by the second servlet is forwarded to a user. Alternatively, the response produced by the second servlet can be forwarded to the user via the first host computer.
The above process may continue for any additional servlets in the chain. For example, upon determining that one or more additional servlets are chained to the second servlet, a third servlet in the chain, residing within a third host computer, is invoked to perform a third processing task using a response produced by the second servlet. A filter within the third host computer examines the fully qualified universal resource locator (URL) used to invoke the third servlet and determines whether one or more additional servlets are chained to the third servlet. Upon determining that no additional servlets are chained to the third servlet, a response produced by the third is forwarded to the user.
According to the present invention, application partitioning can be accomplished by deploying groups of servlets locally and globally across many JVMs. The present invention is particularly advantageous because portions of an application implemented via servlets can reside on multiple JVMs. The present invention can facilitate code reuse because a servlet can belong to one or more groups of servlets. Furthermore, xe2x80x9con-the-flyxe2x80x9d updates to applications can be accomplished more readily because the present invention allows portions of an application that consist of multiple servlets to be modified or updated without impacting other servlets or servlet components.
Servlet chaining across a network, according to the present invention, facilitates tying partitioned servlet components residing across clusters of servers to produce functional applications. Using servlet chaining, according to the present invention, implementation and configuration of distributed servlets is native to a JVM.
With conventional servlet chaining, results from servlets within a single host computer are returned to a user. However, the present invention allows the results from multiple servlets within multiple JVMs to be chained together, even without a user knowing that multiple servlets are being utilized.